﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="jjjs_qlc_hemai.aspx.cs" Inherits="jjjs_qlc_hemai" MasterPageFile="~/APP_Master/MasterPage_Default.master" Title="七乐彩奖金计算" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <title>双色球奖金计算器_奖金计算器</title>
      <script src="App_Themes/js/jiangjinjisuan/jquery-1.js" type="text/javascript"></script>
  <%--<script src="App_Themes/js/jiangjinjisuan/jquery-1.10.2.min.js" type="text/javascript"></script>--%>
    <script src="App_Themes/js/jiangjinjisuan/underscore-min.js" type="text/javascript"></script>

    <link href="App_Themes/css/webstyle.css" rel="stylesheet" />
    <link href="App_Themes/js/jiangjinjisuan/i6Fzam6N7fIj.css" rel="stylesheet" />

    <link href="App_Themes/js/jiangjinjisuan/mod.count.css" rel="stylesheet" />
    <script language="javascript" type="text/javascript">
        $(document).ready(function () {
        
            init();

        }
      );
        function init() {
        $("input[name=itext]").on("keyup", function () {
            var t = $(this).val().replace(/[^(\.|\d)]/g, "");
            $(this).val(t)
        }),
        $("input[name=itext]").on("keyup", function () {
            var n = toNumber($(this).val());
            $(this).val(n);
            var r = $("#itotal").val() * 1,
				i = $("#iafter").val() * 1,
				s = $("#itown").val() * 1;
            r < s && (s = r, $("#itown").val(r));
            if (r) {
                var o = percent(s / r, 100, 3) * 1;
                $(".perown").text(o + "%")
            }
        }),
        $("input[name=fan]").on("change", function () {
            primaryhm()
        }),
        $("#calcul").on("click", function () {
            primaryhm()
        })
    }
      function toNumber(t) {
        return $.isNumeric(t) ? t * 1 : t.split(".").slice(0, 2).join(".") * 1
    }
      function primaryhm() {
          var n = window._;
        var r = $("#per").val() * 1,
			i = $("#iafter").val() * 1,
			s = $("#itotal").val() * 1,
			o = $("#itown").val() * 1,
			u = 0,
			a = 0,
			f = percent(o / s, 100, 3) * 1;
        if (s > 0) if (i > s) {
            if ($("#fq").prop("checked")) {
                $(".templete li").eq(0).show().end().eq(1).hide().end().eq(2).hide(), a = i * o / s + (i - s) * r / 100 * (1 - o / s), u = format(a, 2, -1) * 1, u = currency(u, 2, 0);
                var l = {
                    per: r,
                    bonus: currency(i, 0, 0),
                    total: currency(s, 0, 0),
                    own: currency(o, 0, 0),
                    sub: f,
                    mybonus: u
                },
					c = '<td>\u3010</td><td>' + l.bonus + '</td><td>\uff0d\uff08</td><td>' + l.bonus + '</td><td>\uff0d</td><td>' + l.total + '</td><td>\uff09\u00d7</td><td>' + l.per + '%</td><td>\u3011\u00d7</td><td>' + l.sub + '%</td><td>+\uff08</td><td' + l.bonus + '</td><td>\uff0d</td><td>' + l.total + '</td><td>\uff09\u00d7</td><td>' + l.per + '%</td><td>=</td><td><em class="red" style="font-weight:bold">' + l.mybonus + '</em> \u5143</td>',
					h = n.template(c);
                $(".templete li").eq(0).find(".tmp1").html(h(l)), $(".fsz20").html(u)
            } else {
                a = i * (1 - r / 100) * o / s + s * r / 100 * o / s, u =format(a, 2, -1) * 1, u = currency(u, 2, 0);
                var p = {
                    per: r,
                    bonus: currency(i, 0, 0),
                    total:currency(s, 0, 0),
                    own: currency(o, 0, 0),
                    sub: f,
                    mybonus: u
                };
                $(".templete li").eq(1).show().end().eq(0).hide().end().eq(2).hide();
                var d = '<td>\u3010</td><td>' + p.bonus + '</td><td>\uff0d\uff08</td><td>' + p.bonus + '</td><td>\uff0d</td><td>' + p.total + '</td><td>\uff09\u00d7</td><td>' + p.per + '%</td><td>\u3011\u00d7</td><td>' + p.sub + '%</td><td>=</td><td><em class="red" style="font-weight:bold">' + p.mybonus + '</em> \u5143</td>',
					v = n.template(d);
                $(".templete li").eq(1).find(".tmp2").html(v(p)), e(".fsz20").html(u)
            }
            $(".hm-result h4").html("\u60a8\u7684\u5408\u4e70\u65b9\u6848\u5df2\u76c8\u5229\uff0c\u53d1\u8d77\u4eba\u76c8\u5229\u63d0\u6210\u4e3a" + r + "%")
        } else {
            $(".templete li").eq(2).show().end().eq(0).hide().end().eq(1).hide(), a = i * o / s, u = format(a, 2, -1) * 1, u = currency(u, 2, 0);
            var m = {
                per: r,
                bonus:currency(i, 0, 0),
                sub: f,
                mybonus: u
            },
				g = '<td>\u3010</td><td>' + m.bonus + '</td><td>\u3011\u00d7</td><td>' + m.sub + '%</td><td>=</td><td><em class="red" style="font-weight:bold">' + m.mybonus + '</em> \u5143</td>',
				y = n.template(g);
            $(".templete li").eq(2).find(".tmp3").html(y(m)), $(".fsz20").html(u), $(".hm-result h4").html("\u60a8\u7684\u5408\u4e70\u65b9\u6848\u6ca1\u6709\u76c8\u5229\uff0c\u53d1\u8d77\u4eba\u6ca1\u6709\u76c8\u5229\u63d0\u6210!")
        }
      }

        function percent(e, n, r, i) {
            return format(e * 1 * (n || 100), r, i)
        }
        function format(e, n, r) {
            var i;
            n = typeof (n * 1) != "number" || isNaN(n * 1) ? 2 : Math.abs(n), i = Math.pow(10, n), e *= 1;
            var s = 9.9999e-11;
            switch (r) {
                case 1:
                    e = Math.ceil(e * i) / i;
                    break;
                case -1:
                    e = Math.floor(e * i + s) / i;
                    break;
                case 465:
                    var o = Math.floor(e * i + s) % 10 % 2,
                        u = Math.floor(e * i * 10 + s) % 10 == 5,
                        a = u && !o ? 1 / i : 0;
                    e = format(e, n) - a;
                    break;
                default:
                    e = (e * i + s) / i
            }
            return (e.toFixed(n) + "").replace(/^\./g, "0.").replace(/\.$/, "")//ToFixed四舍五入为指定小数的数字
        }

        function currency(e, n, r) {
            var i;
            return typeof n != "undefined" && (e = format(e, n, r)), i = (e + "").split("."), i[0] = i[0].replace(/(\d)(?=(\d{3})+$)/g, "$1,"), (i[0] + (i.length == 2 ? "." + i[1] : "")).replace(/^\./g, "0.")
        }
    </script>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div id="doc3" style="width: 1200px">
        <div style="padding: 0 0 10px 0;">
            <span class="fl">
                <img src="images/qicle.jpg"></span> <span class="fl kjdb_text1">七乐彩工具大全</span> <span class="fr kjdb_text2">其他奖金计算器： <a href="jjjs_dlt_zigou.aspx">大乐透</a> | <a href="jjjs_ssq_zigou.aspx">双色球</a></span>
            <div class="cl"></div>
        </div>
        <div id="bd" class="kpc-bd">
            <div id="bd">

                <div class="mod-cp-bd">
                    <div class="hd">
                        <div class="hd-main">
                            <ul class="count-hd-tab">
                                <li>
                                    <a href="SevenColorful.aspx">开奖对比</a>
                                </li>
                                <li class="active">
                                    <a href="jjjs_qlc_zigou.aspx">奖金计算</a>
                                </li>
                               <%-- <li><a href="#">专业媒体预测</a></li>--%>
                            </ul>
                        </div>
                    </div>
                    <div class="bd">
                        <div class="count-tab-cont">
                            <div class="nav-cz-sub">
                                <ul class="clearfix">
                                    <li desc="zx"><a href="jjjs_qlc_zigou.aspx">自购计算</a></li>
                                    <li desc="zt" class="active"><a href="jjjs_qlc_hemai.aspx">合买计算</a></li>
                                </ul>
                            </div>
                            <div class="count-box hm-count-box">
                                <div class="bd clearfix">
                                    <div class="mod-select clearfix">
                                        <label class="k">我是合买方案：</label>
                                        <span class="v">
                                            <label class="pre">
                                                <input class="radio_ck" id="fq" name="fan" checked="checked" type="radio">发起者</label>
                                            <label class="pre">
                                                <input class="radio_ck" id="cy" name="fan" type="radio">参与者</label>
                                        </span>
                                    </div>
                                    <ul class="cont-form ">

                                        <li>
                                            <label class="k">盈利提成比例：</label>
                                            <span class="v">
                                                <select name="a3" class="input-small" id="per">
                                                    <option value="0" selected="selected">0% </option>
                                                    <option value="1">1% </option>
                                                    <option value="2">2% </option>
                                                    <option value="3">3% </option>
                                                    <option value="4">4% </option>
                                                    <option value="5">5% </option>
                                                    <option value="6">6% </option>
                                                    <option value="7">7% </option>
                                                    <option value="8">8% </option>
                                                    <option value="9">9% </option>
                                                    <option value="10">10% </option>
                                                </select>
                                            </span>
                                        </li>
                                        <li>
                                            <span class="pre">
                                                <label class="k">方案总金额：</label>
                                                <span class="v">
                                                    <input class="text input-small" tabindex="4" value="0" name="itext" id="itotal" maxlength="9" type="text">
                                                </span></span>
                                            <span class="pre">
                                                <label class="k">方案税后总奖金：</label>
                                                <span class="v">
                                                    <input class="text input-small" tabindex="4" value="0" name="itext" id="iafter" maxlength="9" type="text">
                                                </span></span>
                                        </li>
                                        <li>
                                            <span class="pre">
                                                <label class="k">您认购的金额：</label>
                                                <span class="v">
                                                    <input class="text input-small" tabindex="4" value="0" name="itext" id="itown" maxlength="9" type="text">
                                                </span></span>
                                            <span class="pre">
                                                <label class="k">您认购的百分比：</label>
                                                <span class="v"><strong class="red perown">0%</strong> </span></span>
                                        </li>
                                    </ul>
                                    <div class="mod-submit">
                                        <span class="btn-large3 btn-large2-primary" id="calcul">计算奖金</span>
                                    </div>
                                </div>
                            </div>

                            <div class="count-result">
                                <p class="count-result-hd">
                                    <b>您的应得奖金（税后）是：</b><em class="fsz20">0</em> 元
                                </p>
                                <div class="hm-result">
                                    <h4>您还没有输入合买查询的条件哦，选择后才可以计算出您合买应得奖金！</h4>
                                    <ul class="templete">

                                        <li style="display: none;">
                                            <table class="mytest" cellpadding="0" cellspacing="0">
                                                <tbody>
                                                    <tr>
                                                        <th width="20">【</th>
                                                        <th>税后奖金</th>
                                                        <th width="30">－（</th>
                                                        <th>税后奖金</th>
                                                        <th width="20">－</th>
                                                        <th>方案总金额</th>
                                                        <th width="30">）×</th>
                                                        <th>发起人提成</th>
                                                        <th width="30">】×</th>
                                                        <th>认购百分比</th>
                                                        <th width="30">+（</th>
                                                        <th>税后奖金</th>
                                                        <th width="20">－</th>
                                                        <th>方案总金额</th>
                                                        <th width="30">）×</th>
                                                        <th>发起人提成</th>
                                                        <th width="20">=</th>
                                                        <th>应得奖金</th>
                                                    </tr>
                                                    <tr class="tmp1">
                                                        <td>【</td>
                                                        <td>50010</td>
                                                        <td>－（</td>
                                                        <td>50010</td>
                                                        <td>－</td>
                                                        <td>3800</td>
                                                        <td>）×</td>
                                                        <td>12%</td>
                                                        <td>】×</td>
                                                        <td>23.2%</td>
                                                        <td>+（</td>
                                                        <td>50010</td>
                                                        <td>－</td>
                                                        <td>3800</td>
                                                        <td>）×</td>
                                                        <td>12%</td>
                                                        <td>=</td>
                                                        <td>10290</td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </li>
                                        <li style="display: none;">
                                            <table class="mytest" cellpadding="0" cellspacing="0">
                                                <tbody>
                                                    <tr>
                                                        <th width="20">【</th>
                                                        <th>税后奖金</th>
                                                        <th width="30">－（</th>
                                                        <th>税后奖金</th>
                                                        <th width="20">－</th>
                                                        <th>方案总金额</th>
                                                        <th width="30">）×</th>
                                                        <th>发起人提成</th>
                                                        <th width="30">】×</th>
                                                        <th>认购百分比</th>
                                                        <th width="20">=</th>
                                                        <th>应得奖金</th>
                                                    </tr>
                                                    <tr class="tmp2">
                                                        <td>【</td>
                                                        <td>20000</td>
                                                        <td>－（</td>
                                                        <td>20000</td>
                                                        <td>－</td>
                                                        <td>200</td>
                                                        <td>）×</td>
                                                        <td>3%</td>
                                                        <td>】×</td>
                                                        <td>100%</td>
                                                        <td>=</td>
                                                        <td>19406</td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </li>
                                        <li style="display: none;">
                                            <table class="mytest" cellpadding="0" cellspacing="0">
                                                <tbody>
                                                    <tr>
                                                        <th width="20">【</th>
                                                        <th>税后奖金</th>
                                                        <th width="30">】×</th>
                                                        <th>认购百分比</th>
                                                        <th width="30">=</th>
                                                        <th>应得奖金</th>
                                                    </tr>
                                                    <tr class="tmp3">
                                                        <td>【</td>
                                                        <td>20000</td>
                                                        <td>】×</td>
                                                        <td>0.1%</td>
                                                        <td>=</td>
                                                        <td>20</td>
                                                    </tr>
                                                </tbody>
                                            </table>
                                        </li>

                                    </ul>
                                </div>

                            </div>

                            <div class="data-info data-info02">
                                <h3>合买奖金计算方法说明</h3>
                                <p>
                                    1.中奖金额小于方案总金额
								<br>
                                    应得奖金=税后奖金*认购百分比
                                </p>
                                <p>
                                    2.中奖金额大于方案总金额
								<br>
                                    应得奖金=【税后奖金-（税后奖金-方案总金额）*发起人盈利提成】*认购百分比
								<br>
                                    比如：
								<br>
                                    用户XXX发起一个100元金额的七乐彩方案，并设置了10% 的盈利提成，分成了 50份，您认购了 10份
								<br>
                                    这个方案中奖金额为3000元 发起人提成：（3000-100）*10%=290元
								<br>
                                    剩余奖金：3000元-290元=2710元 那么您的中奖金额就是：10份/50份*2710元=542元
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</asp:Content>
